var fs = require('fs');

var path = require('path');
var filePath = path.join(__dirname, './2.txt');

/* 指明将文件写到哪里去 */
var writable = fs.createWriteStream(filePath);

/* 以流的方式向特定的路径写入一些东西 */
writable.write('hello');
writable.end();